package com.wuxx.task;

import com.wuxx.quartz.job.QuartzTaskJob;
import org.nutz.ioc.loader.annotation.IocBean;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@IocBean
public class TestJob implements QuartzTaskJob {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        LocalDateTime currentDate = LocalDateTime .now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyy-MM-dd HH:mm:ss");
        String formattedDate = currentDate.format(formatter);
        System.out.println("业务逻辑实现！！，执行时间："+formattedDate);
    }
}
